package com.yang.service;

import com.yang.dao.UserMapper;
import com.yang.pojo.Product;
import com.yang.pojo.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

public class UserServiceImpl implements UserService{
    private UserMapper userMapper;
    @Override
    public int addUser(User user) {
        int a=userMapper.addUser(user);
        System.out.println(a);
        return a;
    }

    @Override
    public int deleteUserById(String userNum) {
        return 0;
    }

    @Override
    public User loginUser(User user) {
       return userMapper.loginUser(user);
    }

    @Override
    public int updateUser(User user) {
        System.out.println("jinruSErvice");
        return userMapper.updateUser(user);
    }

    @Override
    public Product queryUserById(String userNum) {
        return null;
    }

    @Override
    public List<Product> queryAllUser() {
        return null;
    }

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper=userMapper;
    }
}
